package com.huterox.todoscheduler.core.global;

import java.io.Serializable;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;

/**
 * 这里存放的是正在执行的清单
 * */
public class RunningTodoListMap implements Serializable {

    private static volatile RunningTodoListMap INSTANCE;
    private Map<String, Object> map;

    private RunningTodoListMap() {
        map = Collections.synchronizedMap(new LinkedHashMap<>());
    }

    public static RunningTodoListMap getInstance() {
        if (INSTANCE == null) {
            synchronized (RunningTodoListMap.class) {
                if (INSTANCE == null) {
                    INSTANCE = new RunningTodoListMap();
                }
            }
        }
        return INSTANCE;
    }

}